home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 99
/
(Vol 99) Jan 19 2010.iso
/
Games
/
arkanoid.swf
/
scripts
/
frame_16
/
DoAction.as
Wrap
Text File
|
2010-01-19
|
1KB
|
45 lines
i = 1;
while(noOfE >= i)
{
expand_y = getProperty("expand" add i, _Y);
expand_y += 6;
setProperty("expand" add i, _Y, expand_y);
if(expand_y > 390)
{
bat_x = getProperty("/bat", _X);
bat_left = bat_x - batWidth / 2;
bat_right = bat_x + batWidth / 2;
expand_x = getProperty("expand" add i, _X);
expand_left = expand_x - 10;
expand_right = expand_x + 10;
if(expand_left >= bat_left && bat_right >= expand_right)
{
tellTarget("/soundFX")
{
gotoAndStop("Expand");
play();
}
trace("You\'ve just got EXPAND");
if(expanded == 0)
{
expanded = 1;
setProperty("/bat", _xscale, 100);
batWidth = 80;
stopDrag();
startDrag("/bat",1,50,400,370,400);
power_up = "expand";
shrunken = 0;
call("reset_capsules");
}
removeMovieClip("expand" add i);
onscreen_E = 0;
}
else
{
removeMovieClip("expand" add i);
onscreen_E = 0;
}
}
i += 1;
}